//
//  ViewFour.m
//  DemoChangBackGround
//
//  Created by duc nguyen van on 8/8/11.
//  Copyright 2011 STU. All rights reserved.
//

#import "ViewFour.h"


@implementation ViewFour


- (id)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code.
    }
    return self;
}

- (void)drawRect:(CGRect)rect {
    // Drawing code.
	CGContextRef context = UIGraphicsGetCurrentContext();
	CGPoint points[] = {CGPointMake(10, 10),
		CGPointMake(70, 15),
		CGPointMake(100, 100)
	};
	
	CGContextMoveToPoint(context, points[0].x, points[0].y);
	for (int i = 1; i < 3; i++) {
		CGContextAddLineToPoint(context, points[i].x, points[i].y);
	}
	CGContextFillPath(context);
}

- (void)dealloc {
    [super dealloc];
}


@end
